load("//tools:defaults.bzl", "jasmine_node_test", "ts_library")

package(default_visibility = ["//aio/tests/deployment:__subpackages__"])

ts_library(
    name = "firebase-test-utils",
    srcs = glob(
        ["*.ts"],
        exclude = ["*.spec.ts"],
    ),
    deps = [
        "@npm//@types/xregexp",
        "@npm//xregexp",
    ],
)

ts_library(
    name = "test_lib",
    testonly = True,
    srcs = glob(
        ["*.spec.ts"],
    ),
    deps = [
        ":firebase-test-utils",
    ],
)

filegroup(
    name = "sources",
    srcs = glob(["*.ts"]),
    visibility = ["//aio/tests/deployment/unit:__pkg__"],
)

jasmine_node_test(
    name = "test",
    deps = [
        ":test_lib",
    ],
)
